﻿using MineMES.Domain.Entity;
using Microsoft.AspNetCore.Mvc;
using MineMES.Application;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MineMES.Api.Controllers
{
    //[ApiController]
    //[Route("[controller]")]
    public class AccountController : ControllerBase
    {
        private AccountApps _accountapps;

        public AccountController(AccountApps accountapps)
        {
            _accountapps = accountapps;
        }

        [HttpGet]
        public async Task<IEnumerable<Account>> Get()
        {
            return await _accountapps.Load();
        }

        [HttpGet]
        //[Route("[controller]")]
        public Account GetById(string accountId)
        {
            return _accountapps.GetById(accountId);
        }
    }
}
